package com.huangpuweb.api.model;

import org.springframework.jdbc.core.RowMapper;

import java.sql.ResultSet;
import java.sql.SQLException;

public class NdUnitRowMapper implements RowMapper<NdUnit> {
    @Override
    public NdUnit mapRow(ResultSet resultSet, int i) throws SQLException {
        NdUnit nd = new NdUnit();
        nd.setId(resultSet.getInt("id"));
        nd.setUnit_name(resultSet.getString("unit_name"));
        nd.setUnit_jc(resultSet.getString("unit_jc"));
        nd.setCredit_code(resultSet.getString("credit_code"));
        nd.setUnit_type(resultSet.getString("unit_type"));
        nd.setPolice_name(resultSet.getString("police_name"));
        nd.setUnit_adress(resultSet.getString("unit_adress"));
        nd.setUnit_phone(resultSet.getString("unit_phone"));
        nd.setName(resultSet.getString("name"));

        return nd;
    }
}
